import * as req from '@/request';

export async function list(
  params?: { [key: string]: any },
  sorter?: { [key: string]: any },
  filter?: { [key: string]: any },
) {
  return req.post<API.CheckTaskList>('/checktask/list',params,sorter,filter,);
}

export async function domainlist() {
  return req.postForm<API.CheckDomainList>(
    '/checktask/domainlist',
  );
}

export async function get() {
  return req.postForm<API.CheckTaskModel>(
    '/checktask/get'
  );
}

export async function create(data: any) {
  return req.postJson<API.Result>('/checktask/create', data);
}

export async function remove(data: {ver: any}) {
  return req.post<API.Result>('/checktask/delete', data);
}

export async function removes(data: {vers: any[]}) {
  return req.post<API.Result>('/checktask/deletes', data);
}

export async function report(params?: { [key: string]: any }) {
  return req.post<API.CheckTaskReport>('/checktask/report', params);
}

export async function updateServer(data: any) {
  return req.post<API.Result>('/checktask/updateServer', data);
}

export async function publish(data: any) {
  return req.post<API.Result>('/checktask/publish', data);
}


